import { userStore } from "../../store/home";
import { useLocalObservable, useObserver, Observer } from "mobx-react-lite";
import { useNavigate,Route ,Link } from "react-router-dom";
import UserInfo from '../user/userInfo'

const Index = () => {
    const navigate = useNavigate();
    return  <Observer>
    {() => (
      <>
        <div>我是首页</div>
        <div>
          <Link to="/home">跳去Home: 我是首页的{userStore.roleName}</Link>
        </div>
        <button onClick={ () => navigate('/userInfo/小青/123 ')} >跳去userInfo</button>
      </>
    )}
  </Observer>
}

export default Index;
